Method and system for securing computer software using a distributed hash table and a blockchain

ABSTRACT

A computer-implemented method ( 100 ) and system ( 1 ) for determining a metadata M for securing a controlled digital resource such as computer software using a distributed hash table ( 13 ) and a peer-to-peer distributed ledger ( 14 ). This is a blockchain such as the Bitcoin blockchain. The method includes determining ( 110 ) a data associated with the computer software and determining ( 120 ) a first hash value based on the computer software. A second hash value based on the data and the computer software may be determined ( 130 ). The method further includes sending  140 , over a communications network ( 5 ), the data, the first hash value and the second hash value to an entry for storage in a distributed hash table ( 13 ). The second hash value may be a key of a key-value pair. The data and the first hash value may be a value in the key-value pair. A metadata (M) that is based on the second hash value may be determined ( 150 ) for storage on the peer-to-peer distributed ledger ( 14 ).

TECHNICAL FIELD

The present disclosure relates to blockchain technology, securitymechanisms and asset transfer. It is particularly suited for use as amechanism for securing digital assets such as computer software andauthorising/controlling access to the asset (eg computer software) usinga distributed hash table and a peer-to-peer distributed ledger (egblockchain).

BACKGROUND

In this document we use the term ‘blockchain’ to include all forms ofelectronic, computer-based, distributed ledgers. These include, but arenot limited to, consensus-based blockchain and transaction-chaintechnologies, permissioned and un-permissioned ledgers, shared ledgersand variations thereof. The most widely known application of blockchaintechnology is the Bitcoin ledger, although other blockchainimplementations have been proposed and developed. While Bitcoin may bereferred to herein for the purpose of convenience and illustration, itshould be noted that the invention is not limited to use with theBitcoin blockchain and alternative blockchain implementations andprotocols fall within the scope of the present invention.

A blockchain is a peer-to-peer, electronic ledger which is implementedas a computer-based decentralised, distributed system made up of blockswhich in turn are made up of transactions. Each transaction is a datastructure that encodes the transfer of control of a digital assetbetween participants in the blockchain system, and includes at least oneinput and at least one output. Each block contains a hash of theprevious block to that blocks become chained together to create apermanent, unalterable record of all transactions which have beenwritten to the blockchain since its inception. Transactions containsmall programs known as scripts embedded into their inputs and outputs,which specify how and by whom the outputs of the transactions can beaccessed. On the Bitcoin platform, these scripts are written using astack-based scripting language.

In order for a transaction to be written to the blockchain, it must be“validated”. Network nodes (miners) perform work to ensure that eachtransaction is valid, with invalid transactions rejected from thenetwork. Software clients installed on the nodes perform this validationwork on an unspent transaction (UTXO) by executing its locking andunlocking scripts. If execution of the locking then unlocking scriptsevaluates to TRUE, the transaction is valid and the transaction iswritten to the blockchain. Thus, in order for a transaction to bewritten to the blockchain, it must be i) validated by the first nodethat receives the transaction—if the transaction is validated, the noderelays it to the other nodes in the network; and ii) added to a newblock built by a miner; and iii) mined, i.e. added to the public ledgerof past transactions.

Although blockchain technology is most widely known for the use ofcryptocurrency implementation, digital entrepreneurs have begunexploring the use of both the cryptographic security system Bitcoin isbased on and the data that can be stored on the Blockchain to implementnew systems. It would be highly advantageous if the blockchain could beused for automated tasks and processes which are not limited to therealm of cryptocurrency. Such solutions would be able to harness thebenefits of the blockchain (e.g. a permanent, tamper-proof record ofevents, distributed processing, etc) while being more versatile in theirapplications.

One area of current research is the use of the blockchain for theimplementation of “smart contracts”. These are computer programsdesigned to automate the execution of the terms of a machine-readablecontract or agreement. Another area of blockchain-related interest isthe use of ‘tokens’ (or ‘coloured coins’) to represent and transferreal-world entities via the blockchain. A potentially sensitive orsecret item can be represented by the token which has no discernablemeaning or value. The token thus serves as an identifier that allows thereal-world item to be referenced from the blockchain, providing enhancedsecurity.

It would be advantageous to be able to use security-related featuressuch as cryptography and blockchain technologies for the purpose oftransmitting, sharing or controlling access to digital assets such as,for example, computer software. Traditional approaches to securing theintegrity and sharing of computer software involve the digital signingof the executables of the computer software. For instance, signing theexecutable or other associated code with a cryptographic pair of keys,such as a public key and a private key. The public key is often obtainedfrom a trusted central authority such as a certification authority.

Computer software is often accompanied by a licence containingcontractual obligations. The licence may contain the terms that governthe use or redistribution of the software. An issue may arise where thecomputer software or the associated licence is unlawfully transferred toanother user.

Any discussion of documents, acts, materials, devices, articles or thelike which have been included in the present specification is not to betaken as an admission that any or all of these matters form part of theprior art base or were common general knowledge in the field relevant tothe present disclosure as it existed before the priority date of eachclaim of this application.

Throughout this specification the word “comprise”, or variations such as“comprises” or “comprising”, will be understood to imply the inclusionof a stated element, integer or step, or group of elements, integers orsteps, but not the exclusion of any other element, integer or step, orgroup of elements, integers or steps.

SUMMARY

Embodiments of the invention may comprise a method and correspondingsystem for controlling access to, and/or transmission of, a controlleddigital resource or asset. The invention may comprise acomputer-implemented method for determining a metadata (M) for securinga controlled digital resource using a distributed hash table and apeer-to-peer distributed ledger (e.g. blockchain). It may be describedas a security method/system or a control method/system. It may bedescribed as a method/system for securing the integrity of, control ofand/or access to the controlled digital resource. The invention maycomprise an authentication or authorisation method/system.

In one embodiment, the controlled digital resource may be computersoftware. Hereafter, the term “software” or “computer software” may beused instead of “controlled digital asset”.

The method may comprise the steps of:

determining a data (D1) associated with the computer software;determining a first hash value (H1) of the computer software;determining a second hash value (H2) based on the data (D1) and thecomputer software; sending, over a communications network, the data(D1), the first hash value (H1) and the second hash value (H2) to anentry for storage in a distributed hash table, wherein the second hashvalue (H2) is a key of a key-value pair and the data (D1) and the firsthash value (H1) are a value in the key-value pair; and determining ametadata (M) comprising the second hash value (H2) for storage on thepeer-to-peer distributed ledger.

The method may further comprise determining a first redeem script (RS1),wherein the first redeem script is based on the metadata (M); and anagent public key (PA) associated with an agent (A). The redeem scriptmay be a redeem script for a blockchain transaction (Tx).

The method may further comprise sending, over the communicationsnetwork, a first data output (O1) for storage on the peer-to-peerdistributed ledger based on an indication of a first quantity ofcryptocurrency (C1) to be transferred, wherein the first quantity ofcryptocurrency (C1) is associated with the first redeem script (RS1);and the first redeem script (RS1).

In the method, the data (D1) may comprise a licence associated with thecomputer software. The licence may be associated with a first user (U1)or a second user (U2) and further comprise a first user public key (PU1)associated with the first user (U1) or a second user public key (PU2)associated with the second user (U2). The licence may further comprise ahash value associated with at least one electronic device of the firstuser (U1) or the second user (U2). The licence may further comprise thefirst hash value (H1).

In the method, the second hash value (H2) may comprise a top hash valueof a Merkle tree.

The invention may provide a computer-implemented method for authorisingaccess to the computer software for a first user (U1), the methodcomprising determining a metadata (M) for securing a computer softwareaccording to the method described above; determining a second redeemscript (RS2), wherein the second redeem script (RS2) is based on: themetadata (M); the agent public key (PA) associated with the agent (A);and the first user public key (PU1) associated with the first user (U1);sending, over a communications network, a second data output (O2) to thepeer-to-peer distributed ledger based on: an indication that the firstquantity of cryptocurrency (C1) from the first data output (O1) is to betransferred; and the second redeem script (RS2).

The method may further comprise determining an identifier indicative ofthe location of the computer software or the licence; assigning theidentifier to the value in the key-value pair; and sending, over thecommunications network, the identifier to the entry on the distributedhash table.

A method for determining the location of the computer software orlicence, the method comprising: determining a metadata (M) for securinga computer software according to the method described above; determiningan identifier indicative of the location of the computer software or thelicence; assigning the identifier to the value in the key-value pair;sending, over the communications network, the identifier to the entry onthe distributed hash table; determining the metadata (M) from the firstredeem script (RS1); retrieving the second hash value (H2) from themetadata (M); sending, over the communications network, the second hashvalue (H2) to a processor associated with a participating node of thedistributed hash table; and determining, from the processor of theparticipating node, an identifier indicative of the location of thecomputer software or licence.

In the methods described above, the cryptocurrency may be Bitcoin andthe peer-to-peer distributed ledger may be the Bitcoin Blockchain.

Embodiments of the invention may comprise the step of providing metadatain a redeem script at a location which is designated in a blockchainprotocol as a location for a cryptographic key.

One or more embodiments of the invention may comprise a method ofembedding metadata in a blockchain transaction, substantially asdescribed in the section below entitled “metadata”. This may comprisethe steps of:

generating a blockchain transaction (Tx) having an output (TxO) relatedto a digital asset and a hash of a redeem script which comprises:

metadata comprising a token which is a representation of, or a referenceto, a tokenised entity; and

at least one public cryptographic key.

The digital asset may be a quantity of cryptocurrency. The metadata maybe provided in the redeem script at a location which is designated in ablockchain protocol as a location for a cryptographic key. Thetransaction Tx may be submitted to a blockchain network.

A computer software program comprising machine-readable instructions tocause a processing device to implement the methods described above.

A computer system for determining a metadata (M) for securing computersoftware using a distributed hash table, the system comprising aprocessing device associated with a node, configured to: determine adata (D1) associated with the computer software; determine a first hashvalue (H1) of the computer software; determine a second hash value (H2)based on the data (D1) and the computer software; send, over acommunications network, the data (D1), the first hash value (H1) and thesecond hash value (H2) to an entry for storage in a distributed hashtable, wherein the second hash value (H2) is assigned to a key of akey-value pair and the data (D1) and the first hash value (H1) are avalue in the key-value pair; and determine a metadata (M) comprising thesecond hash value (H2).

BRIEF DESCRIPTION OF DRAWINGS

Examples of the present disclosure will be described with reference to:

FIG. 1 illustrates an example of a hash table;

FIG. 2 illustrates a schematic diagram of an example system fordetermining a metadata (M) for securing computer software using adistributed hash table;

FIG. 3 illustrates a flow chart of a computer-implemented method fordetermining a metadata (M) for securing a computer software using adistributed hash table;

FIG. 4 illustrates an example of a Merkle tree;

FIG. 5 illustrates an example of a Merkle tree with reference to acomputer software and a licence associated with a computer software;

FIG. 6 illustrates a flow chart of a computer-implemented method fordetermining an identifier indicative of the location of a computersoftware using a distributed hash table; and

FIG. 7 illustrates a schematic of an example processing device.

DESCRIPTION OF EMBODIMENTS

The present disclosure generally relates to methods and systems forutilising a distributed hash table and a peer-to-peer (P2P) distributedledger, such as the Bitcoin Blockchain, to enable securing a computersoftware.

While embodiments described below may refer specifically to transactionsthat occur on the Bitcoin Blockchain (referred to herein as theblockchain), it will be appreciated that the present invention may beimplemented using other P2P distributed ledgers. The blockchain is usedbelow to describe aspects of the invention for simplicity only due toits high level of standardisation and large quantity of associatedpublic documentation.

Distributed Hash Table

In a typical client/server model a central server may be in charge ofthe majority of resources. This means that in the event of an attack onor failure of the central server, the majority of the resources storedon the central server may be compromised. On the contrary, in adistributed model the resources are shared (“distributed”) betweenparticipating nodes. In this way, the capacity of all participatingnodes is utilised and the failure of one server will not compromise themajority of the resources.

FIG. 1 illustrates an example of a hash table. The hash table iscomprised of key-value pairs. The key of each key-value pair is mapped,by way of a hash function, to an index. The index defines the locationof stored values of the key-value pairs.

A DHT is an example of applying the distributed model to a hash table.Similar to a hash table, a DHT comprises key-value pairs and provides anefficient method to locate (“lookup”) a value of a key-value pair givenjust the key. However, in contrast to the hash table, the key-valuepairs are distributed and stored by a number of participating nodes. Inthis way, responsibility for storing and maintaining the key-value pairsis shared by the participating nodes.

In the same way as a hash table, each key-value pair in the DHT ismapped to an index. The index is determined for each key-value pair byperforming a hash function on the key. For example, the cryptographicSecure Hash Algorithm SHA-1 may be used to determine the index.

Each participating node is assigned at least one index by keyspacepartitioning. For each index that the participating node is assigned,the participating node stores the value of that key-value pair.

It is an advantage that values of the key-value pairs may be efficientlyretrieved. To retrieve a value associated with a key, a node may executea “lookup” to determine the responsible node (via the index). Theresponsible node may then be accessed to determine the value.

Bitcoin and the Blockchain

As is well known in the art, a blockchain is a transaction type ledgerwhere storage capacity is distributed across networked nodesparticipating in a system based on the Bitcoin protocol. Each Bitcointransaction is broadcast to the network, the transactions are confirmedand then aggregated into blocks. The blocks are then included on theBlockchain by storing the blocks at multiple participating nodes.

A full copy of a cryptocurrency's P2P distributed ledger contains everytransaction ever executed in the cryptocurrency. Thus, a continuouslygrowing list of transactional data records is provided. Since eachtransaction entered onto the blockchain is cryptographically enforced,the blockchain is hardened against tampering and revision, even byoperators of the participating nodes.

Due to the transparency of the blockchain, histories are publiclyavailable for each transaction.

It is a further advantage of the blockchain is that the transaction isalso the record of the transaction, i.e. the transaction is embeddedwithin the blockchain.

In this way, the information relating to the transaction is captured inthe actual transaction. This record is permanent and immutable andtherefore removes the requirement for a third party to keep thetransaction record on a separate database. Advantageously, the inventionmay use techniques to facilitate this control or transfer of an asset,such as software, via a blockchain, and may enable the transfer to beperformed in a secure manner, incorporating the use of cryptographickeys, while not requiring any alteration of the underlying blockchainprotocol.

Pay-to-Script-Hash and Multi-Signature

While embodiments below may refer specifically to transactions that usethe pay-to-script-hash (P2SH) method of the Bitcoin protocol, it will beappreciated that the present invention may be implemented using anotherfunctionally equivalent method of a blockchain Bitcoin protocol.

Each transaction record on the blockchain comprises a script includinginformation indicative of the transaction and a number of public keys.These public keys may be associated with the sender and recipient of thecryptocurrency. A P2PKH input includes the public key of the sender. AP2PKH output includes the hash of the public key of the recipient. AP2SH multisig input includes the signature of the senders. A script canbe considered as a list of instructions recorded with each transactionrecord on the blockchain that describes how a user may gain access tothe cryptocurrency specified in the transaction record.

As background, in a standard P2SH method of the Bitcoin protocol, theoutput script, or redeem script, may take the form:<NumSigs PubK1 PubK2 . . . PubK15 NumKeys OP_CHECKMULTISIG>

where NumSigs is the number “m” of valid signatures required to satisfythe redeem script to unlock the transaction; PubK1, PubK2 . . . PubK15are the public keys that correspond to signatures that unlock thetransaction (up to a maximum of 15 public keys) and NumKeys is thenumber “n” of public keys.

In the Bitcoin protocol, signatures based on a user's private key may begenerated using the Elliptic Curve Digital Signature Algorithm. Thesignatures are then used for redemption of the cryptocurrency associatedwith the output script or redeem script. When a user redeems an outputscript or redeem script, the user provides their signature and publickey. The output script or redeem script then verifies the signatureagainst the public key.

To redeem the above redeem script, at least a number “m” of signaturescorresponding to the public keys are required. In some examples, theorder of the public keys is important and the number “m” out of “n”signatures for signing must be done in sequence. For example, considerwhere “m” is 2 and “n” is 15. If there are two signatures available foruse, Sig1 (corresponding to PubK1) and Sig 15 (corresponding to PubK15),the redeem script must be signed by Sig1 first followed by Sig15.

Overview of the System

A method, device and system for determining a metadata (M) for securingcomputer software will now be described.

FIG. 2 illustrates a system 1 that includes a first node 3 that is incommunication with, over a communications network 5, a second node 7.The first node 3 has an associated first processing device 21 and thesecond node 5 has an associated second processing device 27. Examples ofthe first and second nodes 3, 7 include an electronic device, such as acomputer, tablet computer, mobile communication device, computer serveretc.

A DHT 13 to record and store key-value pairs is also illustrated in FIG.2. The DHT 13 may be associated with one or more processing devices 19to receive, record and store the values of the key-value pairs. Theprocessing devices 19 may be used by “participating nodes” of the DHT13. As described above, the DHT 13 provides an efficient method tolocate values of key-value pairs.

FIG. 2 also illustrates a P2P distributed ledger 14 to recordtransactions. The P2P distributed ledger 14 may be associated with oneor more processing devices 20 to receive and record transactions. Asdescribed above, an example of a P2P distributed ledger 14 is theBitcoin Blockchain. Therefore, in the context of the blockchain, theprocessing devices 20 associated with the P2P distributed ledger 14 maybe processing devices referred to as “miners”.

The first node 3 is associated with a first user 23 and the second node7 is associated with a second user 24. In one example, the first node 3may represent a vendor of the computer software. In another example, thefirst node 3 may represent an agent or service provider. In yet anotherexample, the first node 3 may represent a user of the computer software.

Similarly, the second node 7 may represent the agent, service provider,vendor of the computer software or a user of the computer software.

In one example, the first node 3 performs the method 100, 500 asillustrated by FIG. 3 and FIG. 6. In another example, the second node 7performs the method 100, 500. While the exemplary embodiments below mayrefer to the first node 3 as performing the methods it is to beunderstood the disclosure may also be adapted or modified to beperformed by other nodes.

The method 100 as illustrated by FIG. 3 includes determining 110 a data(D1) associated with the computer software. The data (D1) may furthercomprise a licence associated with the computer software. The method 100also includes determining 120 a first hash value (H1) based on thecomputer software. In one example, the first hash value (H1) may be inrelation to an executable of the computer software.

The method 100 also includes determining 130 a second hash value (H2)based on the data (D1) and the computer software. In one example, thesecond hash value (H2) may be representative of the details of thecomputer software and the licence associated with the computer software.In a further example, the second hash value (H2) may comprise additionalinformation.

The method 100 further includes sending 140, over a communicationsnetwork 5, the data (D1), the first hash value (H1) and the second hashvalue (H2) to an entry on a distributed hash table 13, wherein thesecond hash value (H2) is assigned to a key of a key-value pair and thedata (D1) and the first hash value (H1) are assigned to the value in thekey-value pair. The value in the key-value pair may further comprise anidentifier indicative of the location of the computer software orlicence.

The method 100 also includes determining 150 a metadata (M) that isbased on the second hash value (H2) for inclusion on the peer-to-peerdistributed ledger 14. In one example, the metadata (M) may be includedin a first redeem script (RS1) for inclusion on the peer-to-peerdistributed ledger 14.

A detailed example of the method will now be described.

Determining a Data Associated with the Computer Software 110

As described above the method 100 includes determining 110 a data (D1)associated with the computer software. Determining 110 a data (D1) maycomprise receiving the data (D1) from a user, node or data store.Determining 110 a data (D1) may further comprise generating the data(D1) at the first node 3.

In one example, the first node 3 may receive the data (D1) from thefirst user 23 via the user interface 15. In another example, the firstnode 3 may receive the data (D1) from the second user 24. In yet anotherexample, the first node 3 may receive the data (D1) from a data store17.

Data (D1) is associated with the computer software where data (D1) mayidentify the computer software, additional information, a licence of thecomputer software or be indicative of the location of the computersoftware. For example, the data (D1) may comprise a string or datastructure that identifies the computer software. The string or datastructure may comprise a collection of identifying keywords and/oradditional information about the computer software. An example ofadditional information may be an identifier of the version of thecomputer software, for example a numeral. For instance, if the computersoftware is entitled BobSoftware and the version is 3.0, the string ordata structure (D1) may comprise “BobSoftware/3.0”.

In a further example, the data (D1) may comprise an identifier of alicence associated with the computer software. This may be a softwarelicence identification number (ID) or a software licence key. In anotherexample, the identifier of the licence may comprise a cryptographic hashof the contents of the licence.

The data (D1) may further comprise an identifier indicative of thestorage location of the computer software. In one example, theidentifier may comprise a URL for an object on the Internet. In afurther example, a link to the storage location of the computer softwareon a repository such as a hash table or distributed hash table may beprovided.

In yet a further example the data (D1) may comprise information thatidentifies the vendor of the computer software. This may includepersonal details such as name, address, contact details or a public keyassociated with the vendor.

Determining a First Hash Value (H1) Based on the Computer Software 120

As also described above the method 100 further includes determining 120a first hash value (H1) of the computer software. Determining 120 afirst hash value (H1) may comprise receiving the first hash value (H1)from a user or accessing the first hash value (H1) from a data store.Determining 120 a first hash value (H1) may further comprise calculatingthe hash value at the first node 3.

In one example, the first node 3 may receive the first hash value (H1)from the first user 23 via the user interface 15. In another example,the first node 3 may receive the first hash value (H1) from the seconduser 24. In yet another example, the first node 3 may access the firsthash value (H1) from a local data store 17 or remote data store.

In one example, the first hash value (H1) is of an executable of thecomputer software. The executable of the computer software may beretrieved from the communications network 5 such as the Internet. Inanother example, the executable may be provided by the first user 23 orthe second user 24. In yet another example, the executable may beretrieved from the data store 17. In yet a further example, theexecutable may be retrievable from a repository such as a hash table ora DHT.

The hash of the executable of the software may be determined using theSHA-256 algorithm to create a 256-bit representation of the information.It is to be appreciated that other hash algorithms may be used,including other algorithms in the Secure Hash Algorithm (SHA) family.Some particular examples include instances in the SHA-3 subset,including SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256.Other hash algorithms may include those in the RACE Integrity PrimitivesEvaluation Message Digest (RIPEMD) family. A particular example mayinclude RIPEMD-160. Other hash functions may include families based onthe Zémor-Tillich hash function and knapsack-based hash functions.

Determining a Second Hash Value (H2) Based on the Data (D1) and theComputer Software 130

The method 100 also includes determining 130 a second hash value (H2)based on the data (D1) and the computer software.

In one example, the second hash value (H2) may be determined based onthe hash of the concatenation of the data (D1) and the executable (orhash of the executable, that is, the first hash value (H1)) of thecomputer software. In a further example, the second hash value (H2) maybe determined based on the hash of the concatenation of the data (D1),the executable (or hash of the executable) of the computer software andadditional information.

Additional information may comprise a public key of the first user 23(PU1) or second user 24 (PU2). In a further example the additionalinformation may comprise an identifier of an entity associated with thefirst user 23 or second user 24. For instance, the entity may be anemployer of the first user 23 or second user 24. In another example, theentity may be a service provider of the first user 23 or second user 24.

The additional information may further comprise a device identifier of adevice associated with the first node 3, second node 7, first user 23 orsecond user 24. An example of a device is the first processing device 21as illustrated in FIG. 2. The device identifier may comprise at leastone of the following: a MAC address, motherboard serial number or adevice identification number. The device identifier may further be aconcatenation of at least two of the MAC address, motherboard serialnumber or device identification number. In a further example the deviceidentifier may comprise a hash value associated with the MAC address,motherboard serial number or device identification number, or theconcatenation described above.

In yet a further example the additional information may comprise anexpiry date of the licence associated with the computer software.

Licence Associated with the Computer Software

In a further example, the second hash value (H2) may be determined basedon the concatenation of the data (D1), the executable (or hash of theexecutable) of the computer software, additional information or thelicence that relates to the computer software.

The representation of the licence may be a file or document whichspecifies the content of the licence. For example, plain ASCII text, aPDF document or a Word document. The second hash value (H2) may includethe licence in its original form, or for example it may provide a linkto the location of the licence on a publicly accessible communicationsnetwork such as the Internet. In a further example, a link to thelocation of the licence on a repository such as a hash table or DHT maybe provided. In yet a further example, a link to the location of thelicence on a computer-based resource, such as the data store 17 may beprovided.

In one example, the licence may comprise the first hash value (H1)associated with the computer software.

The licence associated with the computer software may further compriseadditional information as described above. In one example, the licencemay be associated with a first user 23 or second user 24. The licencemay comprise the public key of the first user 23 (PU1) or second user 24(PU2). In a further example the licence may comprise an identifier of anentity associated with the first user 23 or second user 24.

The licence associated with the computer software may further comprise adevice identifier of a device associated with the first node 3, secondnode 7, first user 23 or second user 24. An example of a device is thefirst processing device 21 as illustrated in FIG. 2. The deviceidentifier may comprise at least one of the following: a MAC address,motherboard serial number or a device identification number. The deviceidentifier may further be a concatenation of at least two of the MACaddress, motherboard serial number or device identification number. In afurther example the device identifier may comprise a hash valueassociated with the MAC address, motherboard serial number or deviceidentification number, or the concatenation described above.

The first user 23 may be the vendor of the computer software and thesecond user 24 may be the recipient (“end user”) of the computersoftware. In another example the second user 23 may be the vendor of thecomputer software and the second user 24 may be the end user of thecomputer software.

In one example the licence associated with the computer software mayauthorise only one end user (a “single-user licence”). In a furtherexample, the licence associated with the computer software may authoriseone device of the end user (a “single-device licence”). In anotherexample the licence associated with the computer software may authorisemore than one device of the end user (a “multi-device licence”).

In another example, there may be more than one end user (a “multi-userlicence”). In a further example, the licence associated with thecomputer software may authorise one device per end user. In anotherexample the licence associated with the computer software may authorisemore than one device per end user.

In the event that the licence is associated with a first user 23 or asecond user 24, the licence may comprise the first user public key (PU1)associated with the first user 23 and the second user public key (PU2)associated with the second user 24.

Merkle Tree

In another example, the licence may be the top hash value of a Merkletree. An example of a Merkle tree is illustrated in FIG. 4. In a Merkletree, the hash value at each node are hashes of their respective “child”nodes. For example, the hash value Hash-A 305 is the hash of the hashvalues at the two “child” nodes 309 and 311. It can be seen that the tophash value of the Merkle tree, Hash-AB 303, comprises all the hashvalues in the Merkle tree. That is, it captures the hash values of thefour “leaves” at the bottom of the tree, A1 317, A2 319, B1 321 and B2323.

In an example of the present disclosure, each “leaf” of the Merkle treemay represent an aspect of the information of the licence. An exemplarylicence is illustrated in FIG. 5. The data (D1) 417 is captured in thehash value Hash-D 409, the executable of the software 419 is captured inthe hash value Hash-S 411 (H1), the public keys 421 of users 23 and/or24 are captured in the hash value Hash-P 413 and the expiry date 423 iscaptured in the hash value Hash-E 415. It can be seen that the nodes 405and 407 capture the hash values associated with the leaves for data (D1)417 and software 419, and public keys 421 and expiry date 423respectively.

It is to be appreciated that other information not otherwise describedabove may comprise the additional information that the hash value (H2)is based on.

Sending the Data (D1), First Hash Value (H1) and Second Hash Value (H2)to a Distributed Hash Table 140

The method 100 also includes sending 140, over a communications network5, the data (D1), first hash value (H1) and the second hash value (H2)to an entry on a distributed hash table 13.

In one example, the second hash value (H2) may be a key of a key-valuepair, and the data (D1) and the first hash value (H1) may be a value inthe key-value pair.

In a further example, additional information as described above may alsobe part of the value in the key-value pair. This includes but is notlimited to: public keys of the first user 23 or second user 24, a deviceidentifier of a device associated with the first node 3, second node 7,first user 23 or second user 24, an identifier indicative of thelocation of the computer software or licence, or further additionalinformation associated with the licence.

As described above, a DHT 13 is comprised of key-value pairs, where eachkey-value pair is assigned to an index. In one example, the second hashvalue (H2) may be used to generate the index. A hash function orcryptographic hash function may be performed on the second hash value(H2). For instance, the cryptographic function SHA-1 may be used:Index=SHA-1(H2)

For the second hash value (H2) to be the key of a key-value pair in theDHT 13, and the data (D1) and the first hash value (H1) to be the valuein the key-value pair, the key and value are sent to any participatingnode of the DHT 13.

In one example, a message such as put (key, value) may be sent to aparticipating node of the DHT 13, where key is the second hash value(H2) and value is the data (D1) and the first hash value (H1). Themessage may be sent around all participating nodes until it is receivedby the participating node that is assigned to the index as indicated bythe keyspace partitioning. The participating node assigned to the indexindicated in the message may then store the key-value pair on the DHT 13and assume responsibility for maintaining the entry associated with thekey-value pair.

It is an advantage that the value of any given key may be retrieved fromthe DHT 13. In one example, the first user 23 or second user 24 may wishto retrieve the value. The first user 23 or second user 24, via thefirst node 3, second node 7 or another node not otherwise illustrated,may provide any participating node of the DHT 13 a request message suchas get (key). The request message may then be sent around allparticipating nodes until it is received by the participating node thatis assigned to the index as indicated by the keyspace partitioning.

Determining a Metadata (M) 150

The method 100 further includes determining 150 a metadata (M) thatcomprises the second hash value (H2). Determining 150 a metadata (M) maycomprise receiving the metadata (M) from a user, node or data store. Themetadata (M) may be included in, for example, in one or more of the 15places available for the public keys in a P2SH multi-signature firstredeem script (RS1) of a transaction on the P2P distributed ledger(blockchain) 14.

The first redeem script (RS1) of the transaction on the P2P distributedledger 14 may represent an issuance, or creation, of a tokenisedtransaction (“issuance token”) that represents the content included inthe metadata (M). In one example, the token may be issued by an agent(A).

In the P2SH method of the Bitcoin protocol, metadata may be included ina redeem script by way of the method described below.

Metadata

Metadata (M) may be embedded in one or more of the 15 places availablefor the public keys in a P2SH multi-signature redeem script (RS1). Forexample, the redeem script (RS1) may take the form of:<NumSigs Metadata1 Metadata2 . . . PubK1 PubK2 . . . NumKeysOP_CHECKMULTISIG>where Metadata1 and Metadata2 each include metadata that takes the placeof a public key in the redeem script and PubK1 and PubK2 are publickeys. In other words, the metadata may be provided in the redeem scriptat a location which is designated by the blockchain protocol as aposition where a cryptographic key should be provided. This provides theadvantage that the metadata can be incorporated into the transaction(Tx) without any change to the underlying blockchain protocol.

Metadata (M) may comprise the second hash value (H2). The metadata (M)may further comprise a description or keyword describing conditionsassociated with the computer software or licence. For example, the dateof the licence, name, date of birth, address, contact details, or otherdetails of the user associated with the licence. In a further example,information associated with the quantity of cryptocurrency may beincluded.

The metadata (M) may include the information in a number of ways. In oneexample, the contents of the information may be included. In a furtherexample, a cryptographic hash of the information may be included. Thehash of the information may be determined using the SHA-256 algorithm tocreate a 256-bit representation of the information. It is to beappreciated that other hash algorithms may be used, including otheralgorithms in the Secure Hash Algorithm (SHA) family. Some particularexamples include instances in the SHA-3 subset, including SHA3-224,SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256. Other hash algorithmsmay include those in the RACE Integrity Primitives Evaluation MessageDigest (RIPEMD) family. A particular example may include RIPEMD-160.Other hash functions may include families based on Zémor-Tillich hashfunction and knapsack-based hash functions.

In further embodiments of the present disclosure, combinations includingone or more of the above may be included in the metadata (M). Since themetadata (M) may be made public by way of the P2P distributed ledger 14such as the blockchain, or transmitted over an unsecure network, it maybe desirable that specific details of the metadata (M) be veiled orhidden for privacy reasons.

Therefore, the use of multi-signature P2SH Bitcoin transactions inembodiments of the present disclosure offers an advantage as it enablesthe transfer and permanent record of information associated with thecomputer software and the licence. This record is achieved by includingthe metadata in the output script of a transaction, for example, aredeem script.

First Redeem Script

As described above, a redeem script is an example of an output script inthe standard P2SH method of the Bitcoin protocol and describes how auser may gain access to the cryptocurrency specified in the transactionrecord.

In the present disclosure the first redeem script (RS1) for the issuancetoken may be based on the metadata (M). The first redeem script (RS1)may further comprise an agent public key (PA) that forms a cryptographicpair with an agent private key (VA). In this way, the agent private key(VA) is required to “unlock” or spend cryptocurrency that is associatedwith the transaction.

In one example, the first redeem script (RS1) for the issuance token mayinclude the metadata (M). The first redeem script (RS1) may furthercomprise an agent public key (PA). In this example, the first redeemscript (RS1) may be of the form:<OP_1 PA Metadata1 Metadata2 OP_3 OP_CHECKMULTISIG>where OP_1 denotes the number of signatures required to satisfy thefirst redeem script (RS1) to unlock the transaction (“NumSigs”), andOP_3 denotes the number of public keys in the redeem script (“NumKeys”).

In this example, the first redeem script (RS1) may comprise twodesignated fields for the metadata, Metadata1 and Metadata2. A specificexample of the Metadata1 and Metadata2 is illustrated in Table 1 below.

TABLE 1 Field Sub-field Bytes Comments Metadata1 LicenceType 4 Codedvalue indicates type of licence. LicencePointer 16 IPv6 addressidentifying the DHT. LicenceTypeData1 12 Format depends on value ofLicenceType. Padded with zeros. Metadata2 LicenceHash 20 RIPEMD-160(SHA256(actual licence file addressed by LicencePointer))LicenceTypeData2 12 Format depends on value of LicenceType. Padded withzeros.

This example includes providing a pointer to the licence in Metadata1which may be useful where the size of the licence precludes includingsuch details in the metadata (M). Furthermore, since the metadata (M)may be made public, or transmitted over an unsecure network, it may bedesirable that specific details of the token be veiled or hidden forprivacy reasons.

The first 4 bytes of Metadata1 indicates the type of licence. Forexample, the licence type may denote the name of the computer softwaresuch as BobSoftware. In a further example the licence type may denotethe authorisation type of the licence, such as “single-user” or“multi-device” as described above. The next 16 bytes holds the IPaddress of the location of the actual electronic licence file, makingallowance for IPv6 addresses. Note that in some embodiments, this valuemay point to the seed of a torrent file such that the licence file canbe distributed over the cloud rather than being centralised. Thefollowing 12 bytes contains data specific to the type of licence.

The first 20 bytes of Metadata2 is a hash of the actual licence fileusing RIPEMD-160 over SHA256 applied to the actual contents of thelicence file. As the actual licence file may be retrievable this allowsvalidation of the transaction against the contract. Note that thelicence file itself may be completely public (unencrypted and humanreadable) or may be encrypted for privacy, depending on the requirementsof the specific embodiment. The content of the remaining 12 bytes ofMetadata2 may be used depending on the type of licence.

It can be seen from the example of the first redeem script (RS1)provided above that the issuance token must be signed by the agent (A)in order to be spent. An example of the transaction for the issuancetoken is provided in Table 2, where for brevity the miner's fee is notshown.

TABLE 2 ID-600 Transaction-ID Version number Version number 1 Number ofinputs ID-110 Prev Trans Output IDX-00 Prev Trans Output index Scriptlength Script length OP_0 Sig-VA < redeem script ID-110 > ScriptSig 00000000 0000 0001 Sequence number 1 Number of outputs C1 Output valueOutput script length Output script length OP_HASH160 < hash of redeemscript Output script (RS1) > OP_EQUAL LockTime LockTime

Lines 4 to 8 of Table 2 represent the input to the transaction which isthe first quantity of cryptocurrency (C1) that is to be included in theissuance token (i.e. “tokenised”). In this example, the first quantityof cryptocurrency (C1) was the result of a previous transaction (ID-110)that transferred the first quantity of cryptocurrency to the benefit ofthe agent (A), and therefore the previous transaction (ID-110) outputscript (redeem script ID-110) includes the agent's public key (PA).Accordingly, to unlock this previous output the script (redeem scriptID-110) must be signed with the first user's private key (VA).

Lines 10 to 12 of Table 2 represent the first (and only) output of thetransaction (ID-600), which in this case is representative of theissuance token being created and transferred back to the agent. Line 10shows the output value, which is the first quantity of cryptocurrency(C1). Line 12 shows the output script, which includes a “<hash of redeemscript >” as is used in the P2SH method of the Bitcoin protocol. In thisexample, the redeem script is the first redeem script (RS1) in the formas described above.

The output of the transaction (ID-600) shown in Table 2 is thenrecorded, with the first data output (O1), on the P2P distributed ledger14. In particular, the first data output (O1) may comprise an indicationof the first quantity of cryptocurrency (C1) that was transferred in thetransaction. The first data output (O1) may further comprise a hash ofthe first redeem script (RS1).

In future transactions of the first quantity of cryptocurrency (C1), forexample the transfer of the token to a first user 23 or second user 24,the script to unlock the first quantity of cryptocurrency (C1) (e.g. theinput ScriptSig of the future transaction) may be in the form:OP_0 Sig-VA Sig-VU1<OP_1 PA PU1 Metadata1 Metadata2 OP_4OP_CHECKMULTISIG>where Sig-VU1 indicates the signature of the first user 23. Note thatthe above script assumes that only one signature from the agent (A) orthe first user 23 is required to unlock the first quantity ofcryptocurrency (C1).

The issuance token may be transferred to another user by way of a secondredeem script (RS2).

Variations

Second Redeem Script

The token that is associated with the computer software and licence maybe transferred from the agent (A) to another user, for example the firstuser 23 or second user 24. In one example, the transfer of the token maybe representative as authorising access to the user for the computersoftware or licence. The transfer may be implemented by a second redeemscript (RS2).

In one example, the agent (A) wishes to transfer the issuance token to afirst user 23. The first user 23 may represent, for example, a vendor ofthe computer software.

In this example, the second redeem script (RS2) may be based on themetadata (M), the agent public key (PA) associated with the agent (A)and the first user public key (PU1) associated with the first user 23.

The second redeem script (RS2) may be of the form:<OP_1 PA PU1 Metadata1 Metadata2 OP_4 OP_CHECKMULTISIG>

In this example, the second redeem script (RS2) comprises the same twometadata fields as the first redeem script (RS1). The second redeemscript (RS2) further comprises the agent public key (PA) associated withthe agent and the first user public key (PU1) associated with the firstuser.

It can be seen from the example of the second redeem script (RS2)provided above that the token that is transferred must be signed by theagent (A) or the first user 23 in order to be spent. An example of thetransaction for this transfer of the issuance token is provided in Table3, where again for brevity the miner's fee is not shown.

TABLE 3 ID-610 Transaction-ID Version number Version number 1 Number ofinputs ID-600 Prev Trans Output IDX-00 Prev Trans Output index Scriptlength Script length OP_0 Sig-VA < OP_1 PA ScriptSig Metadata 1Metadata2 OP_3 OP_CHECKMULTISIG > 0000 0000 0000 0001 Sequence number 1Number of outputs C1 Output value Output script length Output scriptlength OP_HASH160 < hash of redeem Output script script (RS2) > OP_EQUALLockTime LockTime

Similar to Table 2, lines 4 to 8 of Table 3 represent the input to thetransaction (ID-610). In this example, the input is the issuance token,i.e. the output of the transaction (ID-600) that is illustrated in Table2. It can be seen that the redeem script in line 7 corresponds to theredeem script of the issuance token, i.e. the first redeem script (RS1).Accordingly, to unlock the output of the transaction (ID-600) the firstredeem script (RS1) must be signed with the agent's public key (PA).

Lines 10 to 12 of Table 3 represent the output of the transaction(ID-610), which in this case is representative of the issuance tokenbeing transferred to either the agent (A) or the first user 23 (U1).Line 10 shows the output value, which is the first quantity ofcryptocurrency (C1). Line 12 shows the output script, which includes a“<hash of redeem script>” as is used in the P2SH method of the Bitcoinprotocol. In this example, the redeem script is the second redeem script(RS2) in the form as described above.

The output of the transaction (ID-610) is then recorded, with a seconddata output (O2), on the P2P distributed ledger 14. The second dataoutput (O2) may comprise an indication that the first quantity ofcryptocurrency (C1) from the first data output (O1) is to be transferredin the transaction. The second data output (O2) may further comprise ahash of the second redeem script (RS2).

Identifier indicative of the location of the computer software orlicence

As described above the data (D1) or licence may comprise an identifierindicative of the location of the computer software or licencerespectively.

In one example, the identifier may be determined independently to thedata (D1) or the licence and remain separate to the data (D1) orlicence. The identifier may further be assigned to the value of thekey-value pair together with the data (D1) and the first hash value (H1)as described in the method 100 above. In this way, the identifier may beincluded in the value field of the message put (key, value) and sent toa participating node in the DHT 13, as described above.

In one example, the identifier indicative of the location may comprise aURL for an object on the Internet. In another example, the identifierindicative of the location may comprise an address for a repository suchas a hash table or a DHT 13. In yet another example, the identifierindicative of the location may comprise an address for a computer-basedrepository such as a server, database or storage facility provided on acomputer-based resource, such as the data store 17 associated with thefirst processing device 21 of the first node 3.

FIG. 6 illustrates a method 500 for determining location of the computersoftware or licence. The method 500 includes determining 510 themetadata (M) from the first redeem script (RS1). As described above, themetadata (M) may be embedded in one or more of the 15 places availablefor the public keys in the first redeem script (RS1).

In the P2SH method of the Bitcoin protocol, when the output of atransaction is spent in a subsequent transaction, the redeem scriptbecomes visible in the subsequent transaction. As described above andwith reference to Table 2, the transaction (ID-600) for the issuancetoken is paid back to the agent (A). In this way, the agent (A) mayspend this issuance token to expose the first redeem script (RS1). Themetadata (M) that is based on the second hash value (H2) is thereforevisible on the P2P distributed ledger 14. In this way, the second hashvalue (H2) is able to be retrieved 520 from the metadata (M) in thefirst redeem script (RS1). In one example, the value associated with thekey of the key-value pair is able to be retrieved from the DHT 13 usingthe request message get (key).

The method 500 further includes sending 530, over a communicationsnetwork 5, the second hash value (H2) to a processor associated with aparticipating node of the DHT 13. As described above, the second hashvalue (H2) may be the key of the key-value pair. As also describedabove, the value for a given key may be retrieved by providing a messagecontaining the key to any participating node of the DHT 13. Therefore,in the example where the identifier is included in the value field ofthe key-value pair, the method 500 is able to determine 540, from theprocessor of the participating node, the identifier indicative of thelocation of the computer software or licence.

Processing Device

As noted above, the first 3 and second node 7 may be an electronicdevice, such as a computer, tablet computer, mobile communicationdevice, computer server etc. The electronic device may include aprocessing device 21, 27, a data store 17 and a user interface 15.

FIG. 7 illustrates an example of a processing device 21, 27. Theprocessing device 21, 27 may be used at the first node 3, second node 7or other nodes not otherwise illustrated. The processing device 21, 27includes a processor 1510, a memory 1520 and an interface device 1540that communicate with each other via a bus 1530. The memory 1520 storesa computer software program comprising machine-readable instructions anddata for implementing the method 100 and 500 described above, and theprocessor 1510 performs the instructions from the memory 1520 toimplement the method 100 and 500. The interface device 1540 may includea communications module that facilitates communication with thecommunications network 5, and in some examples, with the user interface15 and peripherals such as data store 17. It should be noted thatalthough the processing device 1510 may be an independent networkelement, the processing device 1510 may also be part of another networkelement. Further, some functions performed by the processing device 1510may be distributed between multiple network elements. For example, thefirst node 3 may have multiple processing devices 21 to perform method100, 500 in a secure local area network associated with the first node3.

Where this disclosure describes that a user, employer, employee, issuer,merchant, provider or other entity performs a particular action(including signing, issuing, determining, calculating, sending,receiving, creating etc.), this wording is used for the sake of clarityof presentation. It should be understood that these actions areperformed by the computing devices operated by these entities.

It will be appreciated by persons skilled in the art that numerousvariations and/or modifications may be made to the above-describedembodiments, without departing from the broad general scope of thepresent disclosure. The present embodiments are, therefore, to beconsidered in all respects as illustrative and not restrictive.

The invention claimed is:
 1. A computer-implemented method for securinga controlled digital resource using a distributed hash table and apeer-to-peer distributed ledger, the method comprising: determining adata (D1) associated with the controlled digital resource; determining afirst hash value (H1) of the controlled digital resource; determining asecond hash value (H2) based on the data (D1) and the controlled digitalresource, wherein the data (D1) comprises a license associated with thecontrolled digital resource; sending, over a communications network, thedata (D1), the first hash value (H1) and the second hash value (H2) toan entry for storage in a distributed hash table, wherein the secondhash value (H2) is a key of a key-value pair and the data (D1) and thefirst hash value (H1) are a value in the key-value pair; determining ametadata (M) comprising the second hash value (H2) for storage on thepeer-to-peer distributed ledger; determining a first redeem script(RS1), wherein the first redeem script is based on: the metadata (M); anagent public key (PA) associated with an agent (A); and sending, overthe communications network, a first data output (01) for storage on thepeer-to-peer distributed ledger based on: an indication of a firstquantity of cryptocurrency (C1) to be transferred, wherein the firstquantity of cryptocurrency (C1) is associated with the first redeemscript (RS1); and the first redeem script (RS1); determining anidentifier indicative of a location of the controlled digital resourceor the license; assigning the identifier to the value in the key-valuepair; and sending, over the communications network, the identifier tothe entry on the distributed hash table.
 2. A method according to claim1, wherein the controlled digital resource is computer software.
 3. Themethod of claim 1, wherein the license is associated with a first user(U1) or a second user (U2) and further comprises a first user public key(PU1) associated with the first user (U1) or a second user public key(PU2) associated with the second user (U2).
 4. The method of claim 3,wherein the license further comprises a hash value associated with atleast one electronic device of the first user (U1) or the second user(U2).
 5. The method of claim 1, wherein the license further comprisesthe first hash value (H1).
 6. The method of claim 1, wherein the licensecomprises a top hash value of a Merkle tree.
 7. The method of claim 1,further comprising: determining a second redeem script (RS2), whereinthe second redeem script (RS2) is based on: the metadata (M); the agentpublic key (PA) associated with the agent (A); and a first user publickey (PU1) associated with a first user (U1); and sending, over a secondcommunications network, a second data output (O2) to the peer-to-peerdistributed ledger based on: an indication that a first quantity ofcryptocurrency (C1) from first data output (01) is to be transferred;and the second redeem script (RS2).
 8. The method of claim 1, whereinthe cryptocurrency is Bitcoin.
 9. The method of claim 1, wherein thepeer-to-peer distributed ledger is a Bitcoin blockchain.
 10. Acomputer-implemented method of determining the location of a controlleddigital resource or license, the method comprising: determining ametadata (M) for securing a controlled digital resource in accordancewith the method of claim 1; determining an identifier indicative of thelocation of the controlled digital resource or the license; assigningthe identifier to the value in the key-value pair; sending, over thecommunications network, the identifier to the entry on the distributedhash table; determining the metadata (M) from the first redeem script(RS1); retrieving the second hash value (H2) from the metadata (M);sending, over the communications network, the second hash value (H2) toa processor associated with a participating node of the distributed hashtable; determining, from the processor of the participating node, theidentifier indicative of the location of the controlled digital resourceor license; determining a first redeem script (RS1), wherein the firstredeem script is based on: the metadata (M); and an agent public key(PA) associated with an agent (A); and sending, over the communicationsnetwork, a first data output (01) for storage on the peer-to-peerdistributed ledger based on: an indication of a first quantity ofcryptocurrency (C1) to be transferred, wherein the first quantity ofcryptocurrency (C1) is associated with the first redeem script (RS1);and the first redeem script (RS1).
 11. A computer software programcomprising machine-readable instructions, that when executed by aprocessing device comprising a processor and memory, cause theprocessing device to implement the method of claim
 1. 12. A computersystem operative to secure a controlled digital resource, the systemcomprising a processing device associated with a node, configured to:determine a data (D1) associated with the controlled digital resource;determine a first hash value (H1) of the controlled digital resource;determine a second hash value (H2) based on the data (D1) and thecontrolled digital resource, wherein the data (D1) comprises a licenseassociated with the controlled digital resource; send, over acommunications network, the data (D1), the first hash value (H1) and thesecond hash value (H2) to an entry for storage in a distributed hashtable, wherein the second hash value (H2) is a key of a key-value pairand the data (D1) and the first hash value (H1) are a value in thekey-value pair; determine a metadata (M) comprising the second hashvalue (H2); determine a first redeem script (RS1), wherein the firstredeem script is based on: the metadata (M); and an agent public key(PA) associated with an agent (A); send, over the communicationsnetwork, a first data output (01) for storage on a peer-to-peerdistributed ledger based on: an indication of a first quantity ofcryptocurrency (C1) to be transferred, wherein the first quantity ofcryptocurrency (C1) is associated with the first redeem script (RS1);and the first redeem script (RS1determine an identifier indicative of alocation of the controlled digital resource or the license; assign theidentifier to the value in the key-value pair; and send, over thecommunications network, the identifier to the entry on the distributedhash table.